﻿@model ProgressTracker.WebUI.Models.Progress.DayViewModel

@{
    ViewBag.Title = "Progress History";
}

@using (Html.BeginForm("Day", "Progress", FormMethod.Get, new { id = "daySelectForm", @class="form-horizontal" }))
{
    <div class="form-group">
        <div class="col-md-1 col-sm-1 col-xs-4">
            <label>Select a day: </label>
        </div>
        <div class="col-md-2 col-sm-2 col-xs-5">
            @Html.TextBox("Day", Model.Day.Day.ToShortDateString(), new { id = "Day", @class = "form-control" })
        </div>
        <div class="col-xs-1">
            <button class="btn btn-primary" type="submit">Go!</button>
        </div>
    </div>
}

@Html.Action("DayTable", new { day = @Model.Day.Day })
<script src="~/Scripts/bootstrap-datepicker.js"></script>
<script>
    $(document).ready(function () {
        $('#Day').datepicker({ dateformat: "mm/dd/yyyy" });
    });
</script>
